package com.bwie.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bwie.mapper.TbCourseMapper;
import com.bwie.pojo.TbCourse;
import com.bwie.service.TbCourseService;
import com.bwie.utils.R;
import com.bwie.vo.PageInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TbCourseServiceImpl implements TbCourseService {
    @Autowired
    TbCourseMapper tbCourseMapper;
    @Override
    public R getCourseList(PageInfoVo pageInfoVo) {
        Page<TbCourse> page = new Page<>(pageInfoVo.getPageNum(), pageInfoVo.getPageSize());
        Page<TbCourse> tbCoursePage = tbCourseMapper.selectGetList(page, pageInfoVo.getKeyWord(),pageInfoVo.getBeginTime(),pageInfoVo.getTypeId());
        return R.OK(tbCoursePage);
    }
}
